/*
 * @Descripttion: 
 * @Version: 
 * @Author: gaohj
 * @Date: 2023-02-08 14:12:12
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2023-02-08 14:21:23
 */
window.onload = function () {
    var divEle = document.getElementById('cen_right_top');
    var h3Ele = divEle.querySelectorAll('h3');
    var divEle = divEle.querySelectorAll('div');
    for(let i=0;i<h3Ele.length;i++){

        h3Ele[i].onclick = function () {
            for(let j=0;j<h3Ele.length;j++){
                h3Ele[j].className = "";
                divEle[j].style.display = "none";
            }
            h3Ele[i].className = "active";
            divEle[i].style.display = "block";
        }
    }


}


/* 
    
    {
        i=0;
        h3Ele[0].onclick = function () {
            console.log(i);  // 0 
        }
    }


    {
        i=1;
        h3Ele[1].onclick = function () {
            console.log(i); // 1
        }
    }


    {
        i=2;
        h3Ele[2].onclick = function () {
            console.log(i);  // 2
        }
    }




*/